ci: run Lean Hive simulators in CI#364
Conversation
Greptile SummaryThis PR wires the Lean Hive simulator suites into GitHub Actions by adding a
Confidence Score: 3/5Safe to merge from a runtime-behavior standpoint — no client code is changed — but the new CI jobs will never execute as written. The
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | Adds docker_build and run-hive jobs, but docker_build references a non-existent detect-changes job making its if condition permanently false, so the entire Hive CI path is effectively dead; the failure-artifact upload also has a condition gap. |
| .github/scripts/check-hive-results.sh | New script that parses Hive JSON result files and exits non-zero on any failing test case; logic is sound, edge cases (no files, missing jq, missing dir) are handled, and GitHub step-summary output is guarded by env-var check. |
| .github/config/hive/clients.yaml | Adds devnet3 and devnet4 nametag entries for the ethlambda Hive client; only devnet4 is referenced in the workflow, leaving devnet3 as apparently unused config. |
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
.github/workflows/ci.yml:150-153
**`docker_build` always skipped — `detect-changes` job does not exist**
The `if` condition references `needs.detect-changes.outputs.run_tests`, but `docker_build` has no `needs: detect-changes` declaration and the workflow defines no `detect-changes` job at all. GitHub Actions evaluates `needs.detect-changes` as an empty context, so the expression `needs.detect-changes.outputs.run_tests == 'true'` is permanently `false`. Every run of this workflow will skip `docker_build`, and because `run-hive` declares `needs: docker_build`, every Hive matrix job is skipped as well — making the entire new CI path a no-op.
### Issue 2 of 3
.github/workflows/ci.yml:268-274
**Failure artifacts not uploaded when the Hive simulation itself crashes**
The upload condition `failure() && steps.verify-hive-results.conclusion == 'failure'` only fires when the explicit results-checker script exits non-zero. If the `Run Hive Simulation` step itself fails (e.g., Hive crashes, network timeout, bad Docker image), the `Check Hive Results For Failures` step is skipped (its guard is `if: success()`), leaving `steps.verify-hive-results.conclusion == 'skipped'`. The compound condition is never satisfied, so no artifacts are uploaded on simulation-level failures — exactly the case where diagnostic logs would be most useful.
### Issue 3 of 3
.github/workflows/ci.yml:252-260
**`client` field hard-codes `devnet4` and ignores the `devnet3` nametag**
`clients.yaml` registers both `ethlambda` with `devnet3` and `ethlambda` with `devnet4`, but `client: ethlambda_devnet4` is used unconditionally in the simulation step. The `devnet3` entry appears to be dead config — if it is truly needed for some simulators, it should be referenced in the matrix; if not, it should be removed from `clients.yaml` to avoid confusion.
Reviews (1): Last reviewed commit: "ci: add Hive config for both ethlambda d..." | Re-trigger Greptile
|
Reviewed this from a security angle since it touches CI and comes from outside the org. Overall it's in good shape — workflow correctly uses 1. Add an explicit docker_build:
permissions:
contents: read
...
run-hive:
permissions:
contents: read
...2. Pin uses: ethpandaops/hive-github-action@1aa8d73dad34de13afbb3113ab16c1a462d2fbc3 # v0.5.0Optional: while you're there, v0.5.0 is a few releases behind latest (v0.6.3) — happy to keep v0.5.0 for parity with ethrex's workflow, or bump if you'd prefer to be on the current release. Neither is blocking — the PR is safe to run as-is from a fork — but these would harden it. Functional/cosmetic feedback to follow in a separate comment. |
I will work on the reviews. Thanks! |
🗒️ Description / Motivation
This PR adds Hive coverage to CI for the Lean client simulators now available in
ethereum/hive.Hive already has Lean-focused simulator suites, and
ethlambdaalready supports Hive test-driver mode viaHIVE_LEAN_TEST_DRIVER. This change wires those pieces into GitHub Actions so PRs can exercise the Lean Hive suites automatically and surface failures with uploaded artifacts.What Changed
.github/workflows/ci.ymldocker_buildjob that builds theethlambdaDocker image and uploads it as a workflow artifact.run-hivematrix job for the Lean Hive simulator suites:.github/config/hive/clients.yamlethlambdausing thedevnet4nametag..github/scripts/check-hive-results.shCorrectness / Behavior Guarantees
Tests Added / Run
Added CI coverage through the new Hive workflow jobs.
Local verification run:
bash -n .github/scripts/check-hive-results.sh.github/workflows/ci.ymland.github/config/hive/clients.yamlwith Python YAMLgit diff --checkcheck-hive-results.shwith sample passing and failing Hive JSONNot run locally:
make fmtmake lintcargo test --workspace --releaseRelated Issues / PRs
✅ Verification Checklist
make fmt— cleanmake lint(clippy with-D warnings) — cleancargo test --workspace --release— all passing